<script lang="ts" setup>
withDefaults(defineProps<{ coverProps?: any }>(), {
    coverProps: {
        width: 100,
        height: 100
    }
})
</script>

<template>
    <div class="umrp-media">
        <div class="umrp-media-cover" v-if="!$slots.cover">
            <umrp-image v-bind="coverProps"></umrp-image>
        </div>
        <slot name="cover" v-else></slot>
        <div class="umrp-media-body">
            <slot></slot>
        </div>
    </div>
</template>

<style lang="scss" scoped>
.umrp-media {
    display: flex;
    gap: 10px;

    &-body {
        flex: 1;
    }
}
</style>